package de.core.utils;

import java.awt.GraphicsConfiguration;
import java.awt.GraphicsEnvironment;
import java.awt.Transparency;
import java.awt.image.BufferedImage;

public class ImageUtils {

    public static final GraphicsConfiguration SYSTEM_GRAPHICS_CONFIGURATION = GraphicsEnvironment
        .getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();


    private ImageUtils() {
        // Prevent instantiation
    }

    public static BufferedImage createCompatibleImage(int aWidth, int aHeight) {
        return createCompatibleImage(aWidth, aHeight, Transparency.TRANSLUCENT);
    }

    public static BufferedImage createCompatibleImage(int aWidth, int aHeight, int aTransparency) {
        return SYSTEM_GRAPHICS_CONFIGURATION.createCompatibleImage(aWidth, aHeight, aTransparency);
    }
}
